﻿package com.curlyben.net {
	
	/**
	* ...
	* @author Default
	*/
	public class HTTPHeader {
		
		private var pName:String = "";
		private var pValue:String = "";
		
		public function get Name():String {
			return pName;
		}
		public function set Name(n:String):void {
			pName = n;
		}
		public function get Value():String {
			return pValue;
		}
		public function set Value(v:String):void {
			pValue = v;
		}
		
		public function HTTPHeader(name:String="", value:String="") {
			Name = name;
			Value = value;
		}
		
		public static function Make(fullheader:String):HTTPHeader {
			var c:Array = fullheader.split(":");
			if (c.length > 1)
				return new HTTPHeader(c[0], c[1]);
			else
				return new HTTPHeader(fullheader);
		}
	}
	
}